/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package GrupoD_Final;

import java.util.*;
import org.apache.commons.logging.Log;
import org.apache.commons.logging.LogFactory;

public class ImpSearchProfile extends ImpGenericMessage implements SearchProfile {

    private static final Log LOGGER = LogFactory.getLog(ImpInstantMessage.class);
    ImpGenericMessage igp;
    HashMap results;
    Map cont;
    String cont2;
    ConvertHash conversion;

    //This function fill the Search Profile object
    public void setSearchProfile(ImpGenericMessage igp) {
        this.igp = igp;
    }
    //This function search in the database the information of the Search Profile is required
    //returns a HashMap of the information into a string

    public String getSearchProfile() {
        cont = new HashMap();
        cont2 = igp.getContent();
        conversion = new ConvertHash();
        cont = conversion.stringToMap(cont2);
        if (LOGGER.isDebugEnabled()) {
            LOGGER.debug("Find content. Preparing the results...");
        }
        results = new HashMap();

        results.put("Characteristic", "Content");
        return conversion.mapToString(results);

    }
}
